package com.kd.controller.admin;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.github.pagehelper.PageInfo;
import com.kd.bean.admin.AdminRec;
import com.kd.bean.recruiter.Recruiter_basic;
import com.kd.service.admin.IAdminRecService;

@Controller
@RequestMapping("/adminRec")
public class AdminRecController {

	@Autowired
	private IAdminRecService recService;
	
	@RequestMapping("/queryAllAdminRec_news_status")
	@ResponseBody
	public PageInfo<AdminRec> queryAllAdminRec_news_status(Integer pageNum,Integer pageSize,HttpSession session){
		PageInfo<AdminRec> info = null;
		try {
			Recruiter_basic basic = (Recruiter_basic) session.getAttribute("basicMsg");
			info = recService.queryAllAdminRec_news_status(pageNum, pageSize,basic.getRecruiter_id());
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return info;
	}
	@RequestMapping("/updateAdminRecRec_news_status")
	@ResponseBody
	public Boolean updateAdminRecRec_news_status(Integer adminRec_news_id,Integer adminRec_news_status) {
		Boolean flag = false;
		try {
			flag = recService.updateAdminRecRec_news_status(adminRec_news_id, adminRec_news_status);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return flag;
	}
}
